﻿  <script type="text/javascript">
      SubmittingForm = function () {
          alert("The form has been validated.");
      }

      $(document).ready(function () {

          $("#registration_form").validate({
              submitHandler: function (form) {
                  form.submit();
              },
              rules: {
                  login: "required", 	// simple rule, converted to {required:true}
                  password: "required", 	// simple rule, converted to {required:true}
                  phone: "required", 	// simple rule, converted to {required:true}
                  email: {				// compound rule
                      email: true
                  },
              }
          });

          $("#login_form").validate({
              submitHandler: function (form) {
                  form.submit();
              },
              rules: {
                  auth_login: "required", 	// simple rule, converted to {required:true}
                  auth_password: "required", 	// simple rule, converted to {required:true}
              }
          });
      });

	</script>
<div class="row">
    <table style="width: 100%;">
        <tr>
            <td style="width: 50%; vertical-align: top;">

                <form id="registration_form" class="form-horizontal well category-filter registration" method="post" action="@Url.Action("registration", "Login")">
                    <h3>@Model.Translate("registration_form")</h3>

                    <fieldset>
                        <div class="control-group">
                            <label class="control-label" for="login">@Model.Translate("login_field") *</label>
                            <div class="controls">
                                <input type="text" id="login" name="login" value=""/>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="password">@Model.Translate("password_field") *</label>
                            <div class="controls">
                                <input type="text" id="password" name="password" value=""/>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="phone">@Model.Translate("phone_field") *</label>
                            <div class="controls">
                                <input type="text" id="phone" name="phone" value=""/>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="email">@Model.Translate("email_field")</label>
                            <div class="controls">
                                <input type="text" id="email" name="email" value=""/>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="fio">@Model.Translate("fio_field")</label>
                            <div class="controls">
                                <input type="text" id="fio" name="fio" value=""/>
                            </div>
                        </div>

                    </fieldset>
                
                    <fieldset>
                        <div class="control-buttons">
                            <button class="btn btn-primary" type="submit">@Model.Translate("submit")</button>
                        </div>
                    </fieldset>
                </form>

            </td>
            <td style="width: 50%; vertical-align: top;">

                <form id="login_form" class="form-horizontal well category-filter registration" method="post" action="@Url.Action("logon", "Login")">
                    <h3>@Model.Translate("login_form")</h3>

                    <fieldset>
                        <div class="control-group">
                            <label class="control-label" for="login">@Model.Translate("login_field")</label>
                            <div class="controls">
                                <input type="text" id="auth_login" name="auth_login" value=""/>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="password">@Model.Translate("password_field")</label>
                            <div class="controls">
                                <input type="text" id="auth_password" name="auth_password" value=""/>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset>
                        <div class="control-buttons">
                            <button class="btn btn-primary" type="submit">@Model.Translate("submit")</button>
                        </div>
                    </fieldset>
                </form>

            </td>
        </tr>
    </table>
</div>